package com.hjq.common.utils;

import com.alibaba.nacos.common.utils.MD5Utils;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

/**
 * @auther HJQ
 */
public class PasswordCodingUtils {
    private static BCryptPasswordEncoder passwordEncoder=  new BCryptPasswordEncoder();
    public static String encode(String code){
        return passwordEncoder.encode(code);

    }
    public static boolean isMatch(String code,String encoded){

        return  passwordEncoder.matches(code,encoded);

    }
}
